<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateWechatOffiaccountEventLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wechat_offiaccount_event_logs', function (Blueprint $table) {
            $table->id();
			$table->integer('event_function_id')->comment('触发的自定义事件')->default(0)->index();
			$table->string('openid',255)->comment('')->default('');
			$table->string('event',50)->default('');
			$table->string('key',255)->default('')->nullable();
            $table->timestamp('created_at')->nullable()->index();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wechat_offiaccount_event_logs');
    }
}
